package com.taxi.driver.util;

import android.text.InputFilter;
import android.text.Spanned;

import com.socks.library.KLog;

/**
 * Created by Administrator on 2018/1/20.
 */

public class ExChangFilter implements InputFilter {

    @Override
    public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
        String s = source.toString();
        KLog.e("source=" + source + ",start=" + start + ",end=" + end + ",dest=" + dest + ",dstart=" + dstart + ",dend=" + dend);
        if (s.matches("^[\\da-zA-Z]+$")) {
            return source;
        }
        return "";
    }
}
